package com.ziyun.erp.modules.goods.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.PageUtils;
import com.ziyun.erp.modules.goods.entity.GoodsAttributeEntity;
import io.renren.common.utils.R;

import java.util.List;
import java.util.Map;

/**
 * 商品属性表
 *
 * @author xueqz
 * @email 
 * @date 2018-08-20 09:57:04
 */
public interface GoodsAttributeService extends IService<GoodsAttributeEntity> {

    PageUtils queryPage(Map<String, Object> params);

    Page<GoodsAttributeEntity> queryNewPage(Page<GoodsAttributeEntity> page,Map<String, Object> params);

    String getAttributeNamesByOptionIds(String optionIds);

    String getCraftNamesByCraftOptionIds(String craftOptionIds);

    R getAttributesByTemplateId(Integer templateId,Long sellerId);

    List<GoodsAttributeEntity> getCraftAttributesByTemplateId(Integer templateId);

    Long saveAttriute(GoodsAttributeEntity goodsAttribute);

    List<GoodsAttributeEntity> getTemplateAttribute(Integer categoryId);

    void fagDelAttribute(List<Long> longs);

    List<GoodsAttributeEntity> selectAttribute(Long goodsId);

    List<GoodsAttributeEntity> selectCraft(Long goodsId);

    List<Map<String,Object>> getGoodsCraftList();

    List<Map<String,String>> selectListByOptionIds(String optionIds);

    List<GoodsAttributeEntity> selectByIds(String attributeIds);

    List<GoodsAttributeEntity> getCountAttributeByCategoryId(Integer categoryId);

    Long getCraftAttributeByGoodsId(Long goodsId);

    void updateGoodsAttribute(GoodsAttributeEntity goodsAttribute,Long userId);
}

